﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;

namespace Al.UI.Controls
{
    public class CometSession
    {
        private string _sessionID;
        private CometContext _cometContext;

        public CometSession(string sessionID, CometContext cometContext)
        {
            this._sessionID = sessionID;
            this._cometContext = cometContext;
        }

        public string SessionID
        {
            get { return _sessionID; }
            set { _sessionID = value; }
        }

        public CometContext CometContext
        {
            get { return _cometContext; }
            set { _cometContext = value; }
        }

        public static CometSession GetNewSession()
        {
            string sessionID = Guid.NewGuid().ToString();
            return new CometSession(sessionID, new CometContext(sessionID));
        }
    }
}
